/**
 * ZHU framework. Copyright 2012-, all rights reserved.
 *
 * $Id: LifecycleContext.java 12 2012-07-27 08:48:07Z zhuxiaopeng $
 * $Revision: 12 $
 * $Date: 2012-07-27 16:48:07 +0800 (五, 2012-07-27) $
 * $Author: zhuxiaopeng $
 */
package zhu.framework.entity.lifecycle;

import javax.persistence.*;

import zhu.framework.util.*;

/**
 * <p>
 * </p>
 * 
 * @author $Author: zhuxiaopeng $
 * @version $Revision: 12 $ - $Date: 2012-07-27 16:48:07 +0800 (五, 2012-07-27) $
 */
public final class LifecycleContext {
	public LifecycleContext(final EntityManager entityManager, final LifecycleFactory lifecycleFactory) {
		MyUtility.checkMethodParameterNotNull("entityManager", entityManager);
		MyUtility.checkMethodParameterNotNull("lifecycleFactory", lifecycleFactory);
		this.entityManager = entityManager;
		this.lifecycleFactory = lifecycleFactory;
	}

	public EntityManager getEntityManager() {
		return entityManager;
	}

	public LifecycleFactory getLifecycleFactory() {
		return lifecycleFactory;
	}

	private final EntityManager entityManager;
	private final LifecycleFactory lifecycleFactory;
}
